import akshare as ak
import logging
import configparser
from datetime import datetime
import logging
from logging.config import fileConfig
import pandas as pd
from mongo.MongoHelper import MongoHelper
from functools import wraps
fileConfig('logging_config.ini', disable_existing_loggers=False)
logger = logging.getLogger('simple_example')

class AkshareYearly(object):
    def __init__(self, *args, **kwargs):
        self.config = None
        config = configparser.ConfigParser()
        config.read('../../config.cfg')
        self.symbol = config.get('code', 'symbol')
        self.market = config.get('code', 'market').split(',')
        self.name = config.get('code', 'name')
        database = config.get('db', 'database')
        myUrl = config.get('db', 'url')
        self.mongoHelper = MongoHelper(url=myUrl, database=database)
        logging.info("AkshareYearly initialized")

if __name__ == "__main__":
    logger.info("")
